<?php 

class Module_Account_Model_Role {
	
    public function getPermissionsByRoleId($roleId) {
        $db = Application_Bootstrap::getDbAdapter();
        return $db->query('SELECT p.id as id, p.title as name
        FROM permission p
        LEFT JOIN role2permission r2p ON r2p.permissionId = p.id
        WHERE r2p.roleId = ' . $roleId);
    }


}